<section class="content-header">
    <h1>&nbsp;</h1>
    <ol class="breadcrumb">
        <li><a href="javascript:void(0);"><i class="fa fa-dashboard"></i>
            云链查询</a></li>
        <li class="active">指令查询</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">

    <div class="row" ng-controller="cmdSearchCtrl">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <div class="row">
                        <div class="col-xs-2 col-md-2">
                            <input type="text" class="form-control input-sm"
                                   style="display: inline;" data-ng-model="strFil"
                                   placeholder="全文索引" />
                        </div>
                        <div class="col-xs-6 col-md-6">
                            <span class="text-primary">From</span>
                            <select data-ng-model="areaCodeFrom" id="areaCodeFrom" class="input-sm"
                                    ng-change="areaSelect()"
                                    style=" " ng-options="option.code as option.code for option in areas">
                            </select>
                            <button class="btn btn-default btn-sm" style="margin :0 10px  3px 10px;padding:0 5px 0 5px; " data-ng-click="swapAreaCode()">
                                <img src="images/swap.png"  >
                                <!--<span class="glyphicon glyphicon-arrow-left"></span>
                                <span class="glyphicon glyphicon-arrow-right"></span>-->
                            </button>

                            <span class="text-primary">To</span>
                            <select data-ng-model="areaCodeTo" id="areaCodeTo" class="input-sm"
                                    ng-change="areaSelect()"
                                    style=" " ng-options="option.code as option.code for option in areas">
                            </select>
                        </div>
                        <div class="col-xs-4 col-md-4">
                            <div class="input-group input-group-sm"
                                 style="width: 200px; float: right; padding-right: 10px;">
                                <div class="input-group-btn">
                                    <button type="button" class="btn" data-ng-bind="'Total : '+page.total+', limit : '"></button>
                                </div>
                                <!-- /btn-group -->
                                <input type="number" class="form-control" tabindex="2"
                                       data-ng-model="page.pageSize" style="width: 80px;">
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <table id="example1" class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th><a href="javascript:void(0);" style="color: black;"
                                   data-ng-click="sort('cmdName')">指令 <span
                                    class="glyphicon glyphicon-sort btn-xs"></span>
                            </a></th>
                            <th><a href="javascript:void(0);" style="color: black;"
                                   data-ng-click="sort('sender')">发送方类型 <span
                                    class="glyphicon glyphicon-sort btn-xs"></span>
                            </a></th>

                            <th><a href="javascript:void(0);" style="color: black;"
                                   data-ng-click="sort('receiver')">接收方类型 <span
                                    class="glyphicon glyphicon-sort btn-xs"></span>
                            </a></th>

                            <th><a href="javascript:void(0);" style="color: black;"
                                   data-ng-click="sort('callback')">是否回调 <span
                                    class="glyphicon glyphicon-sort btn-xs"></span>
                            </a></th>
                        </tr>
                        </thead>
                        <tbody>

                        <tr
                                data-ng-repeat="item in datas | filter:strFil | orderBy:orderName:ascOrDesc | limitTo:page.pageSize">
                            <td style="vertical-align: middle;" data-ng-bind="item.cmdName"> </td>
                            <td style="vertical-align: middle;"  width="30%">
                                <a href="javascript:void(0)" data-ng-show="item.senderAppids.length" data-ng-bind="item.sender+'('+item.senderAppids.length+')'" data-ng-click="showAppids($event)"></a>
                                <div style="display: none; ">
                                    <div   data-ng-repeat="appid in item.senderAppids">{{appid}}<br></div>
                                </div>
                            </td>
                            <td style="vertical-align: middle;" width="30%">
                                <a href="javascript:void(0)" data-ng-show="item.receiverAppids.length" data-ng-bind="item.receiver+'('+item.receiverAppids.length+')'" data-ng-click="showAppids($event)"></a>
                                <div style="display: none; ">
                                    <div   data-ng-repeat="appid in item.receiverAppids">{{appid}}<br></div>
                                </div>
                            </td>

                            <td style="vertical-align: middle;" data-ng-bind-html="item.callback | yesOrNoCheck:item.callback "> </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>
    </div>

</section>